<template name="header">
  <nav class="navbar navbar-default navbar-static-top" role="navigation">
    <div class="container-fluid">
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navigation">
          <span class="sr-only">导航开关</span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
          <span class="icon-bar"></span>
        </button>
        <a href="{{pathFor 'home'}}" class="navbar-brand">My Homeworks</a>
      </div>
      <div class="collapse navbar-collapse" id="navigation">
        <ul class="nav navbar-nav navbar-right">
          {{#if isTeacher}}
          <li>
            <a href="{{pathFor 'addRequirement'}}">发布作业</a>
          </li>
          {{/if}}

          {{> loginButtons}}
        </ul>

      </div>
    </div>
  </nav>
</template>